package com.zmn.plat.services.impl.supplier;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zmn.common.dto.VtDTO;
import com.zmn.plat.model.entity.supplier.SupplierCompanyMap;
import com.zmn.plat.persistence.interfaces.supplier.ScmSupplierCompanyMapDAO;
import com.zmn.plat.services.interfaces.supplier.ScmSupplierCompanyMapService;

/**
 * @author DaiZhichao
 * @version v1.0
 * @since 2019/2/1 16:28 类说明：ScmSupplierCompanyMapServiceImpl
 */
@Service
public class ScmSupplierCompanyMapServiceImpl implements ScmSupplierCompanyMapService {

    @Resource
    ScmSupplierCompanyMapDAO mapDAO;

    @Override
    public List<SupplierCompanyMap> listBySupplierId(Integer supplierId) {
        return mapDAO.listBySupplierId(supplierId);
    }

    @Override
    public List<SupplierCompanyMap> listByCompanyId(Integer companyId) {
        return mapDAO.listByCompanyId(companyId);
    }

    @Override
    public List<VtDTO> getSupplierSimpleList(Integer companyId) {
        return mapDAO.listSupplierSimpleList(companyId);
    }

    @Override
    public Integer deleteBySupplierId(Integer supplierId) {
        return mapDAO.deleteBySupplierId(supplierId);
    }

    @Override
    public Integer deleteByCompanyId(Integer companyId) {
        return mapDAO.deleteByCompanyId(companyId);
    }

    @Override
    public Integer insertBatch(List<SupplierCompanyMap> mapList) {
        return mapDAO.insertBatch(mapList);
    }
}
